#include <stdio.h>
#include "SeqList.h"
void Print(struct SeqList list){
	printf("(");
	Position pos =BeginPosition(list);
	if(pos!=EndPosition(list)){
		printf("%d",GetElem(list ,pos));
		pos=NextPosition(list,pos);
	}
	while(pos!=EndPosition(list)){
		printf(", %d",GetElem(list ,pos));
		pos=NextPosition(list,pos);
	}
	printf(")\n");
}
int main() {
	int i;
	struct SeqList  list = Create(1);
	Print(list);
	for(i=1;i<=5;++i){
		InsertBefore(&list , EndPosition(list),i);
	}
	Print(list);
	Position pos = LocateElem(list ,3);
	if(pos!=EndPosition(list)){
		Delete(&list,pos);
	}
	InsertBefore(&list,BeginPosition(list),8);
	Print(list);
	Destroy(&list);
	return 0;
}
